package Test;

public class Order {
    int orderId;
    String orderName;

    public Order(int orderId,String orderName){
        this.orderId=orderId;
        this.orderName=orderName;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public void setOrderName(String orderName) {
        this.orderName = orderName;
    }

    public int getOrderId() {
        return orderId;
    }

    public String getOrderName() {
        return orderName;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof Order)
        {
            Order o = (Order) obj;
            if(o.orderId==this.orderId && o.orderName==this.orderName)
                return true;
        }
        return false;
    }
}
